import request from '@/router/axios';
import serviceList from '@/config/serviceList'
import { baseURL } from '@/api/common';

const { ai } = serviceList

// // 热词查询
// export const getHotWordList = (data) => {
//   return request({
//     url: `${baseURL}api/${ai}/aiAbility/select/hotWord`,
//     method: 'get',
//     params: { ...data }
//   })
// }
// // 智能分类-新增分类
export const save = (data) => {
  return request({
    url: `${baseURL}api/${ai}/aiClassify/save`,
    method: 'post',
    data
  })
}
// // 智能分类-分类列表
export const list = (data) => {
  return request({
    url: `${baseURL}api/${ai}/aiClassify/list`,
    method: 'post',
    data
  })
}
// // 智能分类-分类列表
export const detail = (data) => {
  return request({
    url: `${baseURL}api/${ai}/aiClassify/detail`,
    method: 'get',
    params: { ...data }
  })
}
// // 智能分类-tree删除
export const deleteTree = (data) => {
  return request({
    url: `${baseURL}api/${ai}/aiClassify/delete`,
    method: 'post',
    data: { ...data }
  })
}
// // 智能分类-tree编辑
export const update = (data) => {
  return request({
    url: `${baseURL}api/${ai}/aiClassify/update`,
    method: 'post',
    data: { ...data }
  })
}
// // 智能分类-模型介绍-更新模型
export const updateModel = (data) => {
  return request({
    url: `${baseURL}api/${ai}/aiModelTrainingLog/updateModel`,
    method: 'post',
    data: { ...data }
  })
}
// // 智能分类-模型介绍-开始分析
export const startAnalysis = (data) => {
  return request({
    url: `${baseURL}api/${ai}/aiClassify/startAnalysis`,
    method: 'post',
    data: { ...data }
  })
}
// // 智能分类-分类管理-分类列表
export const aiClassifyManageList = (data) => {
  return request({
    url: `${baseURL}api/${ai}/aiClassifyManage/list`,
    method: 'post',
    data: { ...data }
  })
}
// // 智能分类-分类管理-分类新增
export const aiClassifyManageSave = (data) => {
  return request({
    url: `${baseURL}api/${ai}/aiClassifyManage/save`,
    method: 'post',
    data: { ...data }
  })
}
// // 智能分类-分类管理-分类删除
export const aiClassifyManageDelete = (data) => {
  return request({
    url: `${baseURL}api/${ai}/aiClassifyManage/delete`,
    method: 'post',
    data: { ...data }
  })
}
// // 智能分类-分类管理-分类编辑
export const aiClassifyManageUpdate = (data) => {
  return request({
    url: `${baseURL}api/${ai}/aiClassifyManage/update`,
    method: 'post',
    data: { ...data }
  })
}
// // 智能分类-分类管理-导出分类
export const aiClassifyManageExport = (data) => {
  return request({
    url: `${baseURL}api/${ai}/aiClassifyManage/export`,
    responseType: 'blob',
    method: 'post',
    data: { ...data }
  })
}
// // 智能分类-分类管理-下拉树
export const aiClassifyManageTree = (data) => {
  return request({
    url: `${baseURL}api/${ai}/aiClassifyManage/tree?classifyId=${data.classifyId}`,
    method: 'get',
    // params: { ...data }
  })
}
// // 智能分类-模型训练-表格数据
export const aiModelDataList = (data) => {
  return request({
    url: `${baseURL}api/${ai}/aiModelData/list`,
    method: 'post',
    data: { ...data }
  })
}
// // // 智能分类-模型训练-批量删除
export const aiModelDataDelete = (data) => {
  return request({
    url: `${baseURL}api/${ai}/aiModelData/delete`,
    method: 'post',
    data: { ...data }
  })
}
// // // 智能分类-模型训练-训练记录-表格数据
export const aiModelTrainingLogList = (data) => {
  return request({
    url: `${baseURL}api/${ai}/aiModelTrainingLog/list`,
    method: 'post',
    data: { ...data }
  })
}
// // // 智能分类-模型训练-提交训练
export const aiModelDataSubmit = (data) => {
  return request({
    url: `${baseURL}api/${ai}/aiModelData/submit`,
    method: 'post',
    data: { ...data }
  })
}
// // // 智能分类-模型介绍-末级分类数据
export const aiClassifyManageLevel = (data) => {
  return request({
    url: `${baseURL}api/${ai}/aiClassifyManage/level?classifyId=${data.classifyId}`,
    method: 'get',
    // params: { ...data }
  })
}
// // // 智能分类-模型训练-提交训练后-查询状态
export const trainingStatus = (data) => {
  return request({
    url: `${baseURL}api/${ai}/aiModelTrainingLog/trainingStatus?classifyId=${data.classifyId}`,
    method: 'get',
    // params: { ...data }
  })
}
// // 智能分类-分类管理-导出分类
export const aiModelDataExport = (data) => {
  return request({
    url: `${baseURL}api/${ai}/aiModelData/export`,
    responseType: 'blob',
    method: 'post',
    data: { ...data }
  })
}


